package com.dong.combinationMode.service.engine;

import com.dong.combinationMode.service.logic.LogicFilter;
import com.dong.combinationMode.service.logic.impl.UserAgeFilterImpl;
import com.dong.combinationMode.service.logic.impl.UserGenderFilterImpl;
import lombok.Data;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author DongJiaQi
 * @create 2023/1/5 10:35
 * @Description: 决策节点配置
 */
public class EngineConfig {
    static Map<String, LogicFilter> logicFilterMap;

    static {
        logicFilterMap = new ConcurrentHashMap();
        logicFilterMap.put("userAge", new UserAgeFilterImpl());
        logicFilterMap.put("userGender", new UserGenderFilterImpl());
    }

    public Map<String, LogicFilter> getLogicFilterMap() {
        return logicFilterMap;
    }

    public static void setLogicFilterMap(Map<String, LogicFilter> logicFilterMap) {
        EngineConfig.logicFilterMap = logicFilterMap;
    }

}
